SET( LIB_NAME OpenIG-Plugin-UI )
SET( TARGET_OTHER_FILES DataFiles/libIgPlugin-UI.so.xml DataFiles/libIgPlugin-UI.so.windows.xml)
SET( IgPluginUIFiles 
	IGPluginUI.cpp
	MYGUIManager.h 
	MYGUIManager.cpp 
	FileSelectionDialog.h
	FileSelectionDialog.cpp
	ColourPanel.h
	ColourPanel.cpp
	${TARGET_OTHER_FILES}
)

ADD_LIBRARY( ${LIB_NAME} SHARED ${IgPluginUIFiles}  )

INCLUDE_DIRECTORIES( ${MYGUI_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} )

TARGET_LINK_LIBRARIES( ${LIB_NAME}
    ${OSG_LIBRARIES}
    OpenIG-Engine
	${MYGUI_LIBRARY}
	${MYGUI_OPENGL_LIBRARY}
	${OPENGL_LIBRARY}
	${BOOST_LIBRARIES}
)

SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES VERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES SOVERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES PROJECT_LABEL "Plugin UI" )

INCLUDE( PluginInstall REQUIRED )

IF (APPLE)
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-UI.so.xml DESTINATION ${INSTALL_LIBDIR} RENAME libOpenIG-Plugin-UI.dylib.xml)
ELSEIF(WIN32)
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-UI.so.windows.xml DESTINATION ${INSTALL_BINDIR} RENAME OpenIG-Plugin-UI.dll.xml)
ELSE()
    INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/libIgPlugin-UI.so.xml DESTINATION ${INSTALL_LIBDIR} RENAME libOpenIG-Plugin-UI.so.xml)
ENDIF()
